﻿using System;
using System.Windows;
using DIS.WindowsPhone.Toolkit;
using Microsoft.Phone.Controls;

namespace PhoneApp1
{
    public partial class ExceptionLoggerPage : PhoneApplicationPage
    {
        public ExceptionLoggerPage()
        {
            InitializeComponent();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            throw new Exception();
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            throw new ArgumentException("Some Param is invalid", new Exception("Some Message"));
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(ExceptionLogger.GetLog());
        }

        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            ExceptionLogger.ClearLog();
        }
    }
}